﻿namespace CapHttp.Core;

public class EventAttribute : Attribute
{
    public string? EventName { get; set; }

    public string? ApiName { get; set; }

    public EventAttribute()
    {
        
    }

    public EventAttribute(string eventName, string? apiName = null)
    {
        if (string.IsNullOrWhiteSpace(eventName))
            throw new ArgumentNullException(nameof(eventName));
        
        EventName = eventName;
        ApiName = apiName;
    }
}